
# create sample system command

# exec system command

# verify return code

# run batch and catch errors

=begin
require "test/unit"

$LOAD_PATH.insert( 0, '../lib' )

require 'mongolock/mutex'
require 'mongolock/semaphore'

class TestXyz < Test::Unit::TestCase
	TEST_LOG_BADTYPE = "bad type for log"

	def test_base
		sc = Command.new( "Display 'foobar'", TEST_CMD_OK )
		assert_nothing_raised( Exception ) do
			sc.run
		end

		sc = Command.new( "Make error happen", TEST_CMD_EXITERROR )
		assert_raise( CommandRuntimeError ) do
			sc.run
		end

		sc = Command.new( "Test missing commands", TEST_CMD_MISSING )
		assert_raise( CommandRuntimeError ) do
			sc.run
		end

		assert_raise( CommandArgumentError ) do
			sc = Command.new( "Test command type", TEST_CMD_BADTYPE )
		end

	end


	def test_log
		assert_nothing_raised( CommandArgumentError ) do
			sc = Command.new( "Test log ok", TEST_CMD_OK, TEST_LOG_OK )
		end

		assert_raise( CommandArgumentError ) do
			sc = Command.new( "Test log error", TEST_CMD_OK, TEST_LOG_BADTYPE )
		end
	end

end
=end
